import * as log from 'loglevel';

log.enableAll();

log.debug('all done');
console.log('test');

export default class RedisLock {
    
    redis = null;
    key = null;
    timeoutMsecs = 10 * 1000;
    expireMsecs = 60 * 1000;
    locked = false;
    sleeping = 100;

    constructor(key) {
        this.key = key;
    }

    lock() {
        var timeout = timeoutMsecs;
        while (timeout >= 0) {
            let expires = new Date().getTime() + this.expireMsecs + 1;
            console.log(expires);
        }
    }
}
